<%@ page language="java" contentType="text/html; charset=utf8"
         pageEncoding="utf8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta content="text/html; charset=utf8" http-equiv="Content-Type" >
    <title><spring:message text="Journal" /></title>
</head>
<body>

<jsp:include page="menu/menu.jsp" />

<h2><spring:message text="Journal" /></h2>

<h3><spring:message text="List journal"/></h3>
<c:if test="${!empty journalList}">
    <table class="data">
        <tr>
            <th><spring:message text="#"/></th>
            <th><spring:message text="mark"/></th>
            <th><spring:message text="regNumber"/></th>
            <th><spring:message text="guards in/out"/></th>
            <th><spring:message text="inTime"/></th>
            <th><spring:message text="outTime"/></th>
            <th><spring:message text="others"/></th>
            <th>&nbsp;</th>
        </tr>
        <c:forEach items="${journalList}" var="journal">
            <tr>
                <td>${journal.id}</td>
                <td>${journal.autoId.mark}</td>
                <td>${journal.autoId.regNumber}</td>
                <td>${journal.inGuardId.lastName} / ${journal.outGuardId.lastName}</td>
                <td>${journal.inTime}</td>
                <td>${journal.outTime}</td>
                <td>${journal.others}</td>
                <td><a href="journaldel/${journal.id}"><spring:message text="Delete"/></a></td>
            </tr>
        </c:forEach>
    </table>
</c:if>

</body>
</html>